## extends 
snippet --
<!-- ${1}-->
endsnippet

snippet linput "Input with Label"
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}`!p x(snip)` />
endsnippet

snippet label "label" 
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label>
endsnippet

snippet html "html"
<html>
	${1}
</html>
endsnippet

snippet dl "data list" 
<dl ${1:class="${2}"}>
${3}
</dl>
endsnippet

snippet dt "data list title" 
<dt>$0</dt>
endsnippet

snippet dd "dd" 
<dd>
$0
</dd>
endsnippet

snippet br "br"
<br/> 
endsnippet

snippet img "image" !b
<img src="${1}" alt="$2" title="${2}" />${4}
endsnippet

snippet clear "div class='clear'"
<div class='clear'></div>$0
endsnippet


###########################################
# HTML5
###########################################

snippet input5 "html5 form: calendar、date、time、email、url、search"
<input type="${1:button/checkbox/date/datetime/datetime-local/email/file/hidden/image/month/number/password/radio/range/reset/submit/text/time/url/week}" name="${2:some_name}" id="${3:$2}" value="${4}"`Close()` />${5}
endsnippet

snippet datalist "datalist for input attr list" !b
<datalist id="$1">
	<option label="$2" value="$3">$4
</datalist>
endsnippet

snippet listopt "datalist option" !b
<option label="$1" value="$2">$3
endsnippet

## Html5 media
snippet video
<video src="${1:video.ogg}" controls="${2:controls}" autoplay="${3:autoplay}">${4:Your browser is not support the video tag.}</video>
${5}
endsnippet

snippet videos
<video controls="${1:controls}" autoplay="${2:autoplay}">
	<source src="${3:movie.ogg}" type="${4:video/ogg}" />
	<source src="${5:movie.mp4}" type="${6:video/mp4}" />
	${7:Your browser is not support the video tag.}
</video>
endsnippet

snippet audio
<audio src="${1:audio.ogg}" controls="${2:controls}" autoplay="${3:autoplay}">${4:Your browser is not support the audio tag.}</audio>
${5}
endsnippet

snippet audios
<audio controls="${1:controls}" autoplay="${2:autoplay}">
	<source src="${3:audio.ogg}" type="${4:audio/ogg}"/>
	<source src="${5:audio.mp3}" type="${6:audio/mpeg}"/>
	${7:Your browser is not support the audio tag.}
</audio>
endsnippet

snippet source
<soucrce src="${1:source}" type="${2:video/ogg/video/mp4/audio/ogg/audio/mpeg}" /> 
${3}
endsnippet

# bootstrop css
# ========================================================
# 扩展html bootstrap

# form 
snippet bt-form
<form action="${1:.}" method="post" accept-charset="utf-8" class="form-horizontal">
	$2

	<div class="form-actions">
		<input type="submit" value="Continue →" class='btn btn-primary'>
	</div>
</form>
endsnippet

snippet bt-cg 
<div class="control-group${1}">
	<label class="control-label" for="${2}">${3}</label>
	<div class="controls">
		<input type="text" id="${4:$2}" name="${5:$2}" value="<?php echo set_value('${6:$2}'${7:,$it['$2']}) ?>">
		${8:<span class="help-inline">${9}</span>}
	</div>
</div>
endsnippet

snippet bt-widget
<div class="widget-box">
	<div class="widget-header">
		<h3> ${1} </h3>
	</div>

	<div class="widget-body">

	</div>

	<div class="widget-footer">

	</div>
</div>
endsnippet

snippet bt-widgetf
<div class="widget-box">
	<div class="widget-header">
		<h3> ${1} </h3>
	</div>

	<form id="frm-${2}" action="<?php echo current_url(); ?>" method="post" accept-charset="utf-8" class="form-horizontal">
	<div class="widget-body">
		${3}
	</div>

	<div class="widget-footer">
		<input type="submit" value=" <?php echo lang('submit'); ?> " class='btn btn-primary'>
		<input type="reset" value=' <?php echo lang('reset'); ?> ' class="btn btn-danger"> 
	</div>
	</form>
</div>
endsnippet




